#!/bin/sh

OUT_DIR=/tmp/tidb_binlog_test

CONFIG_FILE=$1
cp $CONFIG_FILE $OUT_DIR/diff.toml
rm -rf $OUT_DIR/sync_diff_$TEST_NAME
sed -i "s/test-name-placeholder/$TEST_NAME/g" $OUT_DIR/diff.toml
sync_diff_inspector --log-level debug --config=$OUT_DIR/diff.toml > $OUT_DIR/diff.log 2>&1
if [ $? -ne 0 ]; then
        cat $OUT_DIR/diff.log
        exit 1
fi
